package com.steven.common.dao;

import com.steven.common.domain.BaseTO;
import com.steven.common.exception.DaoException;

import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: Administrator
 * Date: 12-7-12
 * Time: 上午12:22
 * To change this template use File | Settings | File Templates.
 */
public interface IBaseDao {

    /**
     * 保存实例
     *
     * @param oTO
     * @throws DaoException
     */
    public void editSave(BaseTO oTO) throws DaoException;

    /**
     * 修改实例
     *
     * @param oTO
     * @throws DaoException
     */
    public void editUpdate(BaseTO oTO) throws DaoException;

    /**
     * 保存或修改实例
     *
     * @param oTO
     * @throws DaoException
     */
    public void edit(BaseTO oTO) throws DaoException;

    /**
     * 删除实例
     *
     * @param oTO
     * @throws DaoException
     */
    public void delete(BaseTO oTO) throws DaoException;

    public List<BaseTO> queryAll(String hql) throws DaoException;

}
